<include file="public:no_bs_header" />
<link href="__STATIC__/css/webuploader.css" rel="stylesheet"/>
<script>
    var server = "{:U('download/upload')}"
</script>
<!--菜单添加-->

<div id="tabContent" class="tab-content">
    <form action="{:U('download/add')}" method="post">
        <div class="wu-example" id="uploader">
            <div class="queueList">
                <div class="placeholder <?php if($imgs){ echo 'element-invisible';}?>" id="dndArea">
                    <div id="filePicker" class="webuploader-container">
                        <div class="webuploader-pick webuploader-pick-hover">点击选择图片</div>
                        <div id="rt_rt_1at56ni77a6gjho6m813381t721" style="position: absolute; top: 0px; left: 448px; width: 168px; height: 44px; overflow: hidden; bottom: auto; right: auto;">
                            <input type="file" name="file" class="webuploader-element-invisible" multiple="multiple" accept="image/*"><label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255) none repeat scroll 0% 0%;"></label>
                        </div>
                    </div>
                    <!--            <p>单次最多可选300张</p>-->
                </div>
                <ul class="filelist"></ul>
            </div>

            <!--    封面设置-->



            <div   class="statusBar">

            <div class="progress" style="display: none;">
                <span class="text">0%</span>
                <span class="percentage" style="width: 0%;"></span>
            </div>
            <div class="btns">
                <div id="filePicker2" class="webuploader-container"><div class="webuploader-pick">继续添加</div><div id="rt_rt_1at56ni7j1qm5red1hio16b619os6" style="position: absolute; top: 0px; left: 0px; width: 1px; height: 1px; overflow: hidden;"><input type="file" name="file" class="webuploader-element-invisible" multiple="multiple" accept="image/*"><label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255) none repeat scroll 0% 0%;"></label></div></div><div class="uploadBtn state-pedding">开始上传</div>
            </div>
        </div>
</div>
<div style="text-align: center">
    <a class="btn btn-info save">保存</a>
</div>
</form>
</div>


<include file="public:footer" />
<script src="http://cdn.staticfile.org/webuploader/0.1.0/webuploader.min.js" type="text/javascript"></script>
<script src="__STATIC__/js/webupload.js" type="text/javascript"></script>
<script>

$(document).ready(function(){

    $('.save').click(function(){

        $.ajax({
            url: $('form').attr('action'),
            data: $('form').serialize(),
            dataType: 'json',
            type: 'post',
            success: function(res){
               if(res.status) $('.filelist').html('')
                layer.msg(res.msg);
            }
        })

    })

});
</script>
</body>
</html>